package com.lnsf.bookstore.web.order.vo;

import com.lnsf.bookstore.common.enums.OrderStatus;
import com.lnsf.bookstore.system.orderDetail.vo.OrderDetail;
import com.lnsf.bookstore.system.user.vo.User;
import com.lnsf.bookstore.web.coupon.vo.ApiCoupon;
import com.lnsf.bookstore.web.logistics.vo.ApiLogistics;
import com.lnsf.bookstore.web.orderDetail.vo.ApiOrderDetail;
import com.lnsf.bookstore.web.user.vo.ApiUser;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public class ApiOrder implements Serializable {
    private Integer id;

    private String orderNo;

    private Integer userId;

    private Integer orderStatus;

    private Integer payStatus;

    private String mobile;

    private String receiver;

    private String address;

    private Integer buyCount;

    private BigDecimal actualPrice;

    private BigDecimal orderPrice;

    private BigDecimal freightPrice;

    private Date payTime;

    private Date createTime;

    private Integer payType;

    private Integer payChannel;

    private String buyerRemarks;

    private Integer logisticsId;

    private String logisticsNo;

    private Integer invoiceNeed;

    private Integer invoiceType;

    private String invoiceHead;

    private Integer isSend;

    private Integer isCancel;

    private Integer couponId;

    private List<ApiOrderDetail> apiOrderDetailList ;

    private ApiUser apiUser; //用户

    private ApiLogistics apiLogistics; //物流

    private ApiCoupon apiCoupon;

    //展示字段
    private String bookTotalPrice;//商品总价
    private String orderStatusText;//订单状态名称

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    public Integer getPayStatus() {
        return payStatus;
    }

    public void setPayStatus(Integer payStatus) {
        this.payStatus = payStatus;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    public Integer getBuyCount() {
        return buyCount;
    }

    public void setBuyCount(Integer buyCount) {
        this.buyCount = buyCount;
    }

    public BigDecimal getActualPrice() {
        return actualPrice;
    }

    public void setActualPrice(BigDecimal actualPrice) {
        this.actualPrice = actualPrice;
    }

    public BigDecimal getOrderPrice() {
        return orderPrice;
    }

    public void setOrderPrice(BigDecimal orderPrice) {
        this.orderPrice = orderPrice;
    }

    public BigDecimal getFreightPrice() {
        return freightPrice;
    }

    public void setFreightPrice(BigDecimal freightPrice) {
        this.freightPrice = freightPrice;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    public Integer getPayChannel() {
        return payChannel;
    }

    public void setPayChannel(Integer payChannel) {
        this.payChannel = payChannel;
    }

    public String getBuyerRemarks() {
        return buyerRemarks;
    }

    public void setBuyerRemarks(String buyerRemarks) {
        this.buyerRemarks = buyerRemarks;
    }

    public Integer getLogisticsId() {
        return logisticsId;
    }

    public void setLogisticsId(Integer logisticsId) {
        this.logisticsId = logisticsId;
    }

    public String getLogisticsNo() {
        return logisticsNo;
    }

    public void setLogisticsNo(String logisticsNo) {
        this.logisticsNo = logisticsNo;
    }

    public Integer getInvoiceNeed() {
        return invoiceNeed;
    }

    public void setInvoiceNeed(Integer invoiceNeed) {
        this.invoiceNeed = invoiceNeed;
    }

    public Integer getInvoiceType() {
        return invoiceType;
    }

    public void setInvoiceType(Integer invoiceType) {
        this.invoiceType = invoiceType;
    }

    public String getInvoiceHead() {
        return invoiceHead;
    }

    public void setInvoiceHead(String invoiceHead) {
        this.invoiceHead = invoiceHead;
    }

    public ApiUser getApiUser() {
        return apiUser;
    }

    public void setApiUser(ApiUser apiUser) {
        this.apiUser = apiUser;
    }

    public List<ApiOrderDetail> getApiOrderDetailList() {
        return apiOrderDetailList;
    }

    public void setApiOrderDetailList(List<ApiOrderDetail> apiOrderDetailList) {
        this.apiOrderDetailList = apiOrderDetailList;
    }

    public Integer getIsSend() {
        return isSend;
    }

    public void setIsSend(Integer isSend) {
        this.isSend = isSend;
    }

    public Integer getIsCancel() {
        return isCancel;
    }

    public void setIsCancel(Integer isCancel) {
        this.isCancel = isCancel;
    }

    public ApiLogistics getApiLogistics() {
        return apiLogistics;
    }

    public void setApiLogistics(ApiLogistics apiLogistics) {
        this.apiLogistics = apiLogistics;
    }

    public String getBookTotalPrice() {
        return bookTotalPrice;
    }

    public void setBookTotalPrice(String bookTotalPrice) {
        this.bookTotalPrice = bookTotalPrice;
    }

    public String getOrderStatusText() {
        if(orderStatus != null){
            return OrderStatus.valueOf(orderStatus).toText();
        }
        return "";
    }

    public void setOrderStatusText(String orderStatusText) {
        this.orderStatusText = orderStatusText;
    }

    public ApiCoupon getApiCoupon() {
        return apiCoupon;
    }

    public void setApiCoupon(ApiCoupon apiCoupon) {
        this.apiCoupon = apiCoupon;
    }

    public Integer getCouponId() {
        return couponId;
    }

    public void setCouponId(Integer couponId) {
        this.couponId = couponId;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
}